From: Peter Simonyi Date: Sat, 16 May 2020 13:04:32 +0000 (-0400) Subject: status: Pass scroll events to volume and brightness sliders X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~383 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=87606c6a6b565f84782c7ec12a39277917ee866a;p=gnome-shell.git status: Pass scroll events to volume and brightness sliders Sliders can be operated by mouse scroll, but the mouse has to be over the slider control. Make the brightness and volume system menu entries forward scroll events to the sliders they contain so that scrolling anywhere on the menu item operates the slider. Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2795 --- diff --git a/js/ui/status/brightness.js b/js/ui/status/brightness.js index 2d0fee49a..17247880f 100644 --- a/js/ui/status/brightness.js +++ b/js/ui/status/brightness.js @@ -48,7 +48,9 @@ class Indicator extends PanelMenu.SystemIndicator { this._item.connect('key-press-event', (actor, event) => { return this._slider.emit('key-press-event', event); }); - + this._item.connect('scroll-event', (actor, event) => { + return this._slider.emit('scroll-event', event); + }); } _sliderChanged() { diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js index e8a787c4d..64767b848 100644 --- a/js/ui/status/volume.js +++ b/js/ui/status/volume.js @@ -56,6 +56,9 @@ var StreamSlider = class { this.item.connect('key-press-event', (actor, event) => { return this._slider.emit('key-press-event', event); }); + this.item.connect('scroll-event', (actor, event) => { + return this._slider.emit('scroll-event', event); + }); this._stream = null; this._volumeCancellable = null;